{layout '../Public/layoutList.latte'} {*继承layoutList模板*}

{block searchForm}
    <div class="tableoptions searchForm tableoptions-min">
        {$searchForm|noescape}
    </div>
{/block}

{block title}积分明细{/block}
{block actions}
{/block}
{block content}
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
        <thead>
        <tr>
            <th></th>
            <th><span class="table-head">被申请人</span></th>
            <th><span class="table-head">标准</span></th>
            <th><span class="table-head">积分</span></th>
            <th><span class="table-head">申请人</span></th>
            <th><span class="table-head">审核人</span></th>
            <th><span class="table-head">发放时间</span></th>
        </tr>
        </thead>
        <tbody>
        {foreach $lists as $k=>$item}
            <tr>
                <td style="width: 60px;display:none"><input type="checkbox" name='ids[]' class="checkall_1 checkall-item" value="{$item['a_id']}"/></td>
                {if $item['a_sysMemo'] && !preg_match('/^\d+$/',$item['a_sysMemo'])}
                    <td style="width: 60px;">
                        <span class="spread">+</span>
                    </td>
                {else}
                    <td style="width: 60px;">
                    </td>
                {/if}
                <td class="wid-auto">{$item['uName']}</td>
                <td class="wid-auto">[{$item['names']}]{$item['sNames']}{if preg_match('/^\d+$/',$item['a_sysMemo'])}<span style="color:red">[#{$item['a_sysMemo']}]</span>{/if}</td>
                <td class="wid-auto">{$item['a_acorn']}</td>
                <td class="wid-auto">{$item['fullName']}</td>
                <td class="wid-auto">{$item['fullNames']}</td>
                <td class="wid-auto">{$item["a_addTime"]|totime}</td>
            </tr>
            <tr class="memo" hidden>
                <td colspan="8" width="100%">{$item['a_sysMemo']|noescape}</td>
            </tr>
        {/foreach}
        </tbody>
    </table>
{/block}
{block private_js}
    <script type="text/javascript">
        $(function () {
            $(".spread ").click(function () {
                var is = $(this).parent().parent().index();
                is++;
                if (!$('tbody tr').eq(is).attr('id')) {
                    $('tbody tr').eq(is).attr('id', 'show');
                    $('tbody tr').eq(is).removeAttr('hidden');
                    is--;
                    $('tbody tr').eq(is).find('span.spread').text('-');
                }
                else {
                    $('tbody tr').eq(is).removeAttr('id');
                    $('tbody tr').eq(is).attr('hidden', 'hidden');
                    is--;
                    $('tbody tr').eq(is).find('span.spread').text('+');
                }
            });
        });
    </script>
{/block}
{block private_css}
    <style>
        .list-more-action{
            display:none;
        }
        .spread{
            display:block;
            width:25%;
            margin:auto;
            text-align:center;
            font-size:14px;
            line-height:14px;
            border:1px solid #333333;
        }

        .memo > td{
            text-align:center;
            line-height:32px;
        }

        .tableoptions-min.tableoptions.searchForm input.search-keyword{
            width:200px !important;
            height:22px;
            padding-left:5px;
        }

    </style>
{/block}



